<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>call Ande apply</title>
</head>
<script type="text/javascript">
    function fun(a,b){
        console.log(this);
        console.log(a);
        console.log(b);
    }
    var obj = new Object();
    fun(1,2);
    fun.call(obj,12,2);
    //fun.apply(obj,3,4);//报错：CreateListFromArrayLike called on non-object
    fun.apply(obj,[2,3]);
</script>
<body>
    
</body>
</html>